Applications characterized as “latency sensitive” are, typically, highly susceptible to execution delays and jitter (i.e., unpredictability) introduced by the computing environment in which these applications run. Examples of latency sensitive applications include financial trading systems, which usually require split-second response time when performing functions such as pricing securities or executing and settling trades.
One source of execution delay is the system kernel, specifically, the kernel scheduler that runs therein. The scheduling and de-scheduling of system and user tasks contributes to latency in a number of ways. First, tasks that are scheduled for execution may spend a non-trivial amount of time in a queue for a particular central processing unit (CPU) before the tasks are dispatched for execution on that CPU. Further, the tasks, once executing, may be preempted by higher priority tasks.
When a virtual CPU (which emulates a physical CPU for a virtual machine) is halted by a virtual machine's guest operating system, the execution of the virtual CPU is, in turn, halted on a physical CPU. This is usually achieved by the kernel scheduler preempting the execution of the virtual CPU on some physical processor, and queueing the task corresponding to the virtual CPU for later execution. When the virtual CPU becomes ready to run again, the virtual CPU task is typically placed into a run queue of the same or other CPU for subsequent execution on that CPU. The intervention by the kernel scheduler to both preempt the virtual CPU and to requeue the virtual CPU when the virtual CPU becomes ready to run is a source of latency, which can cause problems for latency sensitive applications executing on the preempted virtual CPU.